package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

/**
 * @ClassName CashType
 * @Description: CashType
 * @Author ck
 * @Date 2021/11/22
 * @Version V1.0
 **/
@Getter
public enum CashTypeEnum {
    /**
     * 类目改变:findPlateFiancialStatistics
     */
    CZ_VIP(1, "充值VIP"),
    CZ_LOVE(2, "充值小红心"),
    TX_LOVE(3, "提现小红心");

    private int code;

    private String desc;

    CashTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CashTypeEnum getDscByType(Integer type) {
        for (CashTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}